const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()

async function migrate() {
    console.log('🔄 Running data migration...')

    try {
        // 在这里添加数据迁移逻辑
        // 例如：更新现有数据，添加新字段的默认值等

        console.log('✅ Data migration completed successfully!')
    } catch (error) {
        console.error('❌ Data migration failed:', error)
        throw error
    } finally {
        await prisma.$disconnect()
    }
}

migrate()
    .catch((error) => {
        console.error(error)
        process.exit(1)
    })
